package com.gaoxk.utils;

/**
 * @ClassName FailException
 * @Description TODO
 * @Author gaoy
 * @Date 2019/9/11 16:35
 * @Version 1.0
 **/
public class FailException extends Exception {
    /**
     * 前端显示参数
     */
    String message;
    /**
     * 流程跳转状态
     */
    int status;
    /**
     * 日志输出原因参数
     */
    String subMessage;

    public FailException(String message) {
        this(-1, message, "");
    }


    public FailException(String message, String subMessage) {
        this(-1, message, subMessage);
    }


    public FailException(int status, String message) {
        this(status, message, "");
    }


    public FailException(int status, String message, String subMessage) {
        setStatus(status);
        setMessage(message);
        setSubMessage(subMessage);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }


    public String getSubMessage() {
        return subMessage;
    }

    public void setSubMessage(String subMessage) {
        this.subMessage = subMessage;
    }
    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
